home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / tex / mf / rexx / createonemode.rexx < prev    next >
OS/2 REXX Batch file  |  1994-05-13  |  2KB  |  103 lines

  1. /*
  2. **  AREXX $VER: CreateOneMode 1.0 (13.05.94)
  3. **
  4. **  Georg Hessmann (hessmann@informatik.uni-hamburg.de)
  5. **
  6. **
  7. **  CreateOneMode
  8. **
  9. **  Create the all fonts of one mode (defined via xdpi/ydpi and Modes file).
  10. **
  11. **
  12. **  Arguments: xdpi ydpi pkdir
  13. **
  14. **    xdpi, ydpi : to select the mode (see MF:config/modes)
  15. **    pkdir    : target directory
  16. **
  17. **  Test for all Magsteps, if there is a fontlist file in flistdir.
  18. **  If so, call CreateMagBatch for this magstep. Than call
  19. **  the created script file MagBatch.sh.
  20. **  Repeat this for all magstps.
  21. **
  22. **
  23. **
  24. **  HISTORY:  
  25. **
  26. **  1.0:  Wrote the script.
  27. **        Georg Hessmann (13.05.94)
  28. **
  29. */
  30.  
  31. parse arg xdpi ydpi pkdir .
  32.  
  33. SIGNAL ON ERROR
  34. SIGNAL ON FAILURE
  35. SIGNAL ON BREAK_C
  36. SIGNAL ON BREAK_D
  37.  
  38. flistdir  = "MF:config/fontlist"
  39. CMagBatch = "MF:rexx/CreateMagBatch"
  40. BatchFile = "RAM:MagBatch.sh"
  41.  
  42.  
  43. Numeric DIGITS 12
  44.  
  45. MAGMULT.0      = 13            /* number of saved MagSteps */
  46.  
  47. MAGMULT.NUM.1  = 1.0           /* MagStep(0)   */
  48. MAGMULT.STR.1  = "0"
  49. MAGMULT.NUM.2  = 1.09544511501 /* MagStep(0.5) */
  50. MAGMULT.STR.2  = "0.5"
  51. MAGMULT.NUM.3  = 1.2           /* MagStep(1)   */
  52. MAGMULT.STR.3  = "1"
  53. MAGMULT.NUM.4  = 1.31453413801 /* MagStep(1.5) */
  54. MAGMULT.STR.4  = "1.5"
  55. MAGMULT.NUM.5  = 1.44          /* MagStep(2)   */
  56. MAGMULT.STR.5  = "2"
  57. MAGMULT.NUM.6  = 1.57744096561 /* MagStep(2.5) */
  58. MAGMULT.STR.6  = "2.5"
  59. MAGMULT.NUM.7  = 1.728         /* MagStep(3)   */
  60. MAGMULT.STR.7  = "3"
  61. MAGMULT.NUM.8  = 2.0736        /* MagStep(4)   */
  62. MAGMULT.STR.8  = "4"
  63. MAGMULT.NUM.9  = 2.48832       /* MagStep(5)   */
  64. MAGMULT.STR.9  = "5"
  65. MAGMULT.NUM.10 = 2.985984      /* MagStep(6)   */
  66. MAGMULT.STR.10 = "6"
  67. MAGMULT.NUM.11 = 3.5831808     /* MagStep(7)   */
  68. MAGMULT.STR.11 = "7"
  69. MAGMULT.NUM.12 = 4.29981696    /* MagStep(8)   */
  70. MAGMULT.STR.12 = "8"
  71. MAGMULT.NUM.13 = 5.159780352   /* MagStep(9)   */
  72. MAGMULT.STR.13 = "9"
  73.  
  74.  
  75. DO i=1 TO magmult.0
  76.  
  77.   flist = flistdir"/flst-"magmult.str.i
  78.   IF exists(flist) THEN DO
  79.     dpi = xdpi * magmult.num.i + 0.5
  80.     dpi = dpi % 1
  81.     
  82.     pkdest = pkdir""dpi
  83.     IF ~exists(pkdest) THEN address command 'makedir 'pkdest
  84.     CMagBatch flist dpi xdpi ydpi pkdest"/"
  85.     
  86.     address command 'execute 'BatchFile
  87.   END
  88.  
  89. END
  90.  
  91.  
  92.  
  93. EXIT 0
  94.  
  95. /*---------------------------------*/
  96.  
  97.  
  98. BREAK_C:
  99. BREAK_D:
  100. ERROR:
  101. FAILURE:
  102.          EXIT 5
  103.